<?php
namespace Hive\Widget;
/**
 * Widget Object. 
 * 
 * It data (title,uri...) that are needed to display a widget, and make the list available
 * and handle inside the DB
 *
 * @author Xavier VILAIN
 * @package Hive\Widget
 * @license ##
 * 
 * @property int 	$categoryud			Unique Id
 * @property string $language			Default Language
 * @property string $label				Label
 * 
 */
class Category extends \Fox\Object\Customizing {
	
	/**
	 * Widget Link
	 * @var string
	 */
	const LINK_WIDGETS = 'widgets';
}
\Fox\Dao::infos(Category::className(),new \Fox\Object\Info('widget_categories', \Fox\Databases::DB_APP));
//\Fox\Dao::useZone(Category::className(),new \Fox\Dao\DiskTimeCacheZone(\Fox\Dao\DiskTimeCacheZone::PERIOD_FOREVER,Category::cacheDirectory()));
// Link to I18n
\Fox\Object\Links::add(\Fox\Dao::link(Category\I18n::className(),Category\I18n::LINK_REFERENCE)
	->to(Category::className(),Category::LINK_I18N)
	->on('categoryid')
);
// Link to Widgets
\Fox\Object\Links::add(\Fox\Dao::link(\Hive\Widget::className(),\Hive\Widget::LINK_CATEGORY)
	->to(Category::className(),Category::LINK_WIDGETS)
	->on('categoryid')
);